package com.dkm.biz.gl.repository.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.dkm.base.core.helper.SpringHelper;
import com.dkm.base.db.persistence.dao.IQueryDao;
import com.dkm.biz.gl.domain.GlFilterVocabulary;
import com.dkm.biz.gl.persistence.dao.GlFilterVocabularyQueryDao;
import com.dkm.biz.gl.persistence.entity.GlFilterVocabularyPo;
import com.dkm.biz.gl.repository.GlFilterVocabularyRepository;
import com.dkm.biz.repository.AbstractRepository;

/**
 * 对象功能:敏感词过滤词汇 Repository接口的实现类
 * 开发公司:SKG.COM
 * 开发人员:HLX
 * 创建时间:2015-10-21 11:15:49
 */
@Repository
public class GlFilterVocabularyRepositoryImpl extends AbstractRepository<String, GlFilterVocabularyPo,GlFilterVocabulary> implements GlFilterVocabularyRepository{
	  
	@Resource
	private  GlFilterVocabularyQueryDao glFilterVocabularyQueryDao;

	public GlFilterVocabulary newInstance() {
		GlFilterVocabularyPo po = new GlFilterVocabularyPo();
		GlFilterVocabulary glFilterVocabulary = SpringHelper.getBean(GlFilterVocabulary.class);
		glFilterVocabulary.setData(po);
		return glFilterVocabulary;
	}

	public GlFilterVocabulary newInstance(GlFilterVocabularyPo po) {
		GlFilterVocabulary glFilterVocabulary = SpringHelper.getBean(GlFilterVocabulary.class);
		glFilterVocabulary.setData(po);
		return glFilterVocabulary;
	} 
	
	@Override
	protected IQueryDao<String, GlFilterVocabularyPo> getQueryDao() {
		return glFilterVocabularyQueryDao;
	}

	@Override
	public List<GlFilterVocabularyPo> findByWord(String word) {
		// TODO Auto-generated method stub
		return glFilterVocabularyQueryDao.findByWord(word);
	}
	
}
